<?php
/**
 * Created by PhpStorm.
 * User: 田家强
 * Date: 2017/4/13
 * Time: 16:51
 */
namespace Home\Controller;
use Think\Controller;
class SearchController extends Controller{

    public function index()
    {

    $keywords= I('get.keywords');
    $search ='%'.$keywords.'%';
    $search_info =m('goods')->where(array('gname'=>array('like',$search)))->select();
        $this->assign('search_info',$search_info);
//        dd($search_info);
$this->display();
    }






}